#ifndef BASE64_H
#define BASE64_H

#include <stddef.h>
#include <stdbool.h>

#define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)

extern bool isbase64 (char ch);
extern void base64_encode (const char *in, size_t inlen,char *out, size_t outlen);
extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
extern bool base64_decode (const char *in, size_t inlen,char *out, size_t *outlen);
extern bool base64_decode_alloc (const char *in, size_t inlen,char **out, size_t *outlen);
				 
#endif
